import ajax from '@/utils/request'
// 登录请求
export function login(data: {
    username: string,
    password: string,
    phone?: string
}) {
    return ajax({
        url: '/login',
        method: 'post',
        data
    })
}
// 注册请求
export function admin(data: {
    name: string,
    username: string,
    password: string,
}) {
    return ajax({
        url: '/admin',
        method: 'post',
        data
    })
}
// 发送验证码
export function sendCode(data: {
    phone: string,
}) {
    return ajax({
        url: '/sendCode',
        method: 'post',
        data
    })
}
// 验证验证码
export function verify(data: { expirationTime: string, code: string }) {
    return ajax({
        url: '/verify',
        method: 'post',
        data
    })
}
